package data.entities;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import business.interfaces.ICalendarioReserva;
import business.interfaces.ICancha;

@Entity
@Table(name="CalendarioReservas")
public class CalendarioReserva implements ICalendarioReserva {
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private Integer id;
	
	@Column
	private Date fecha;
	
	@Column
	private Integer hora;
	
	@ManyToOne
	@JoinColumn(name="numeroCancha")
	private Cancha cancha;
	
	@Column
	private Boolean estaLibre;

	public Date getFecha() {
		return this.fecha;
	}

	public void setFecha(Date fecha) {
		this.fecha = fecha;
	}

	public Integer getHora() {
		return this.hora;
	}

	public void setHora(Integer hora) {
		this.hora = hora;
	}

	public ICancha getCancha() {
		return this.cancha;
	}

	public void setCancha(Cancha cancha) {
		this.cancha = cancha;
	}

	public Boolean getEstaLibre() {
		return this.estaLibre;
	}

	public void setEstaLibre(Boolean estaLibre) {
		this.estaLibre = estaLibre;
	}
}
